/*
 Navicat Premium Data Transfer

 Source Server         : 华为云
 Source Server Type    : MySQL
 Source Server Version : 80032
 Source Host           : 123.60.140.66:3306
 Source Schema         : yrmall_sms

 Target Server Type    : MySQL
 Target Server Version : 80032
 File Encoding         : 65001

    营销服务
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sms_coupon
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon`;
CREATE TABLE `sms_coupon` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type` tinyint(1) NOT NULL COMMENT '类型 1 商品券 2 通用券',
  `template_code` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '优惠券模板编码',
  `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '名称',
  `is_limited` tinyint NOT NULL DEFAULT '1' COMMENT '是否开启数量限制',
  `num` int NOT NULL DEFAULT '1' COMMENT '优惠券总数量',
  `amount` decimal(18,2) NOT NULL COMMENT '金额',
  `limited` int NOT NULL DEFAULT '1' COMMENT '每人限制领取数量',
  `min_point` decimal(10,2) NOT NULL COMMENT '最低使用金额',
  `start_time` datetime NOT NULL COMMENT '开放领取时间',
  `end_time` datetime NOT NULL COMMENT '结束领取时间',
  `receive_type` tinyint(1) NOT NULL COMMENT '领取方式 1自动发放，2手动领取',
  `remark` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注',
  `member_level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '会员等级限制',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0 未发布 1 已发布 2 已失效',
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(255) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_by` varchar(255) DEFAULT NULL,
  `is_deleted` bit(1) NOT NULL DEFAULT b'0',
  `version` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1686382736376471555 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_coupon
-- ----------------------------
BEGIN;
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1671818392838057985, 2, 'red', '全场通用无门槛优惠券', 1, 9999, 30.00, 1, 0.00, '2023-06-22 17:50:54', '2023-07-31 17:50:57', 2, '111', 0, 1, '2023-06-22 17:52:20', 'Leron', '2023-07-08 15:41:15', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1674417822346997761, 2, 'golden', '全场满300减30', 1, 20, 30.00, 1, 300.00, '2023-06-28 00:00:00', '2023-07-31 00:00:00', 2, NULL, 0, 1, '2023-06-29 22:01:33', 'Leron', '2023-07-08 15:41:00', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1675525101238497281, 1, 'red', '苹果手机满6000减300', 1, 300, 300.00, 300, 6000.00, '2023-07-02 00:00:00', '2023-07-29 00:00:00', 2, NULL, 0, 1, '2023-07-02 23:21:29', 'Leron', '2023-07-10 23:02:40', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677585771954167809, 2, 'red', '满400减30', 1, 200, 30.00, 1, 400.00, '2023-07-06 00:00:00', '2023-07-31 00:00:00', 2, NULL, 0, 1, '2023-07-08 15:49:51', 'Leron', '2023-07-10 23:02:38', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677586956144599042, 2, 'red', '满1000减30', 1, 300, 30.00, 1000, 1000.00, '2023-07-01 00:00:00', '2023-07-31 00:00:00', 2, NULL, 0, 1, '2023-07-08 15:54:33', 'Leron', '2023-07-10 23:02:37', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1686377395865694210, 2, 'golden', '全场无门槛券', 1, 1000, 30.00, 10, 0.00, '2023-08-01 00:00:00', '2026-08-06 00:00:00', 2, NULL, 0, 1, '2023-08-01 22:04:37', 'Leron', '2023-08-01 22:27:42', 'Leron', b'0', 0);
INSERT INTO `sms_coupon` (`id`, `type`, `template_code`, `name`, `is_limited`, `num`, `amount`, `limited`, `min_point`, `start_time`, `end_time`, `receive_type`, `remark`, `member_level`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1686382736376471554, 2, 'red', '满3000减300', 1, 1000, 300.00, 2, 3000.00, '2023-08-01 00:00:00', '2026-08-06 00:00:00', 2, NULL, 0, 1, '2023-08-01 22:25:50', 'Leron', '2023-08-01 22:27:42', 'Leron', b'0', 0);
COMMIT;

-- ----------------------------
-- Table structure for sms_coupon_history
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_history`;
CREATE TABLE `sms_coupon_history` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` bigint NOT NULL COMMENT '优惠券',
  `member_id` bigint NOT NULL COMMENT '会员',
  `member_username` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '会员昵称',
  `receive_type` tinyint(1) NOT NULL COMMENT '领取类型 1 自动领取 2 手动领取',
  `used` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否使用',
  `use_time` datetime DEFAULT NULL COMMENT '使用时间',
  `order_sn` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '关联订单号',
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(255) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_by` varchar(255) DEFAULT NULL,
  `is_deleted` bit(1) NOT NULL DEFAULT b'0',
  `version` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1686940823581192194 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='优惠券领取记录';

-- ----------------------------
-- Records of sms_coupon_history
-- ----------------------------
BEGIN;
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1674427538435452930, 1671818392838057985, 1, 'Leron', 2, 1, NULL, NULL, '2023-06-29 22:40:09', 'Leron', '2023-07-10 23:04:53', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1674796677901578242, 1674417822346997761, 1, 'Leron', 2, 1, NULL, NULL, '2023-06-30 23:06:59', 'Leron', '2023-07-10 23:05:03', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677318569258586114, 1675525101238497281, 1, 'Leron', 2, 1, NULL, NULL, '2023-07-07 22:08:05', 'Leron', '2023-07-10 23:04:29', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677585988652883970, 1677585771954167809, 1, 'Leron', 2, 0, NULL, NULL, '2023-07-08 15:50:42', 'Leron', '2023-07-23 22:39:20', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677585991777640449, 1675525101238497281, 1, 'Leron', 2, 0, NULL, NULL, '2023-07-08 15:50:43', 'Leron', '2023-07-10 23:04:40', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1677587039112126466, 1677586956144599042, 1, 'Leron', 2, 0, NULL, NULL, '2023-07-08 15:54:53', 'Leron', '2023-07-29 22:23:46', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1685669658026450945, 1677586956144599042, 1, 'Leron', 2, 0, NULL, NULL, '2023-07-30 23:12:19', 'Leron', NULL, NULL, b'0', 1);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1686383396522172418, 1686382736376471554, 1, 'Leron', 2, 1, NULL, NULL, '2023-08-01 22:28:28', 'Leron', '2023-08-01 22:28:39', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1686383401718915073, 1686377395865694210, 1, 'Leron', 2, 1, NULL, NULL, '2023-08-01 22:28:29', 'Leron', '2023-08-01 22:43:04', 'Leron', b'0', 2);
INSERT INTO `sms_coupon_history` (`id`, `coupon_id`, `member_id`, `member_username`, `receive_type`, `used`, `use_time`, `order_sn`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1686940823581192193, 1686377395865694210, 1, 'Leron', 2, 0, NULL, NULL, '2023-08-03 11:23:29', 'Leron', NULL, NULL, b'0', 1);
COMMIT;

-- ----------------------------
-- Table structure for sms_coupon_spu_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_coupon_spu_relation`;
CREATE TABLE `sms_coupon_spu_relation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` bigint NOT NULL,
  `spu_id` bigint NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1675525101536292866 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_coupon_spu_relation
-- ----------------------------
BEGIN;
INSERT INTO `sms_coupon_spu_relation` (`id`, `coupon_id`, `spu_id`) VALUES (1675525101418852353, 1675525101238497281, 1647519689088360450);
INSERT INTO `sms_coupon_spu_relation` (`id`, `coupon_id`, `spu_id`) VALUES (1675525101536292865, 1675525101238497281, 1647526154876411905);
COMMIT;

-- ----------------------------
-- Table structure for sms_member_price
-- ----------------------------
DROP TABLE IF EXISTS `sms_member_price`;
CREATE TABLE `sms_member_price` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `sku_id` bigint DEFAULT NULL COMMENT 'sku_id',
  `member_level_id` bigint DEFAULT NULL,
  `member_level_name` varchar(100) DEFAULT NULL,
  `member_price` decimal(18,4) DEFAULT NULL,
  `add_other` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_member_price
-- ----------------------------
BEGIN;
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (1, 2, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (2, 2, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (3, 2, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (4, 3, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (5, 3, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (6, 3, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (7, 4, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (8, 4, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (9, 4, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (10, 5, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (11, 5, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (12, 5, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (13, 6, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (14, 6, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (15, 6, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (16, 7, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (17, 7, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (18, 7, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (19, 8, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (20, 8, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (21, 8, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (22, 9, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (23, 9, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (24, 9, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (25, 10, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (26, 10, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (27, 10, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (28, 11, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (29, 11, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (30, 11, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (31, 12, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (32, 12, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (33, 12, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (34, 13, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (35, 13, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (36, 13, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (37, 14, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (38, 14, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (39, 14, 5, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (40, 15, 3, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (41, 15, 4, NULL, 0.0000, 1);
INSERT INTO `sms_member_price` (`id`, `sku_id`, `member_level_id`, `member_level_name`, `member_price`, `add_other`) VALUES (42, 15, 5, NULL, 0.0000, 1);
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill`;
CREATE TABLE `sms_seckill` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(200) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL COMMENT '每日开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '每日结束时间',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(255) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_by` varchar(255) DEFAULT NULL,
  `is_deleted` bit(1) NOT NULL DEFAULT b'0',
  `version` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_seckill
-- ----------------------------
BEGIN;
INSERT INTO `sms_seckill` (`id`, `name`, `start_time`, `end_time`, `status`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`, `version`) VALUES (1, '限时秒杀', '2023-08-01 22:32:55', '2023-12-26 11:00:00', 1, '2023-06-20 21:31:15', NULL, '2023-08-01 22:31:56', 'Leron', b'0', 0);
COMMIT;

-- ----------------------------
-- Table structure for sms_seckill_sku_relation
-- ----------------------------
DROP TABLE IF EXISTS `sms_seckill_sku_relation`;
CREATE TABLE `sms_seckill_sku_relation` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `seckill_id` bigint NOT NULL COMMENT 'session_id',
  `sku_id` bigint NOT NULL COMMENT 'sku',
  `price` decimal(10,0) NOT NULL COMMENT '价格',
  `count` decimal(10,0) NOT NULL COMMENT '总量',
  `limited` decimal(10,0) NOT NULL COMMENT '限购数量',
  `sort` int NOT NULL COMMENT '商品排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_seckill_sku_relation
-- ----------------------------
BEGIN;
INSERT INTO `sms_seckill_sku_relation` (`id`, `seckill_id`, `sku_id`, `price`, `count`, `limited`, `sort`) VALUES (1, 1, 1647526959381667841, 998, 10, 1, 1);
INSERT INTO `sms_seckill_sku_relation` (`id`, `seckill_id`, `sku_id`, `price`, `count`, `limited`, `sort`) VALUES (2, 1, 1647526959998230529, 398, 1, 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for sms_spu_bounds
-- ----------------------------
DROP TABLE IF EXISTS `sms_spu_bounds`;
CREATE TABLE `sms_spu_bounds` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `spu_id` bigint DEFAULT NULL,
  `grow_bounds` decimal(18,4) DEFAULT NULL,
  `buy_bounds` decimal(18,4) DEFAULT NULL,
  `work` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sms_spu_bounds
-- ----------------------------
BEGIN;
INSERT INTO `sms_spu_bounds` (`id`, `spu_id`, `grow_bounds`, `buy_bounds`, `work`) VALUES (3, 3, 1.0000, 1.0000, NULL);
INSERT INTO `sms_spu_bounds` (`id`, `spu_id`, `grow_bounds`, `buy_bounds`, `work`) VALUES (4, 5, 8.0000, 11.0000, NULL);
INSERT INTO `sms_spu_bounds` (`id`, `spu_id`, `grow_bounds`, `buy_bounds`, `work`) VALUES (5, 11, 0.0000, 0.0000, NULL);
INSERT INTO `sms_spu_bounds` (`id`, `spu_id`, `grow_bounds`, `buy_bounds`, `work`) VALUES (6, 12, 0.0000, 0.0000, NULL);
COMMIT;

-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `branch_id` bigint NOT NULL,
  `xid` varchar(100) NOT NULL,
  `context` varchar(128) NOT NULL,
  `rollback_info` longblob NOT NULL,
  `log_status` int NOT NULL,
  `log_created` datetime NOT NULL,
  `log_modified` datetime NOT NULL,
  `ext` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of undo_log
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
